import static org.junit.Assert.*;

import java.util.Set;

import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import business.Aluno;
import business.CalendarDate;
import business.Departamento;
import business.Disciplina;
import business.Inicial;
import business.Professor;
import business.Professor.Categoria;
import business.Professor.GrauAcademico;
import business.Seccao;

public class ProfessorTest {

	// @BeforeClass
	// public static void setUpBeforeClass() throws Exception {
	// Inicial.open("data/phenix_Z.cmd");
	// }

	@Test
	public void constroiProfessorVazio() {
		Professor ze = new Professor();
	}

	@Test
	public void constroiProfessorNaoVazio() {
		Professor ze = new Professor("Ze", new CalendarDate(1, 1, 1950),
				"xxx@xxx.com", GrauAcademico.licenciado,
				Categoria.profAssociado, 101, "C904", new Seccao("Ali",
						new Departamento("Baba")));
	}

	@Test
	public void setGrau() {
		Professor ze = new Professor();
		ze.setGrau(GrauAcademico.mestre);
	}

	@Test
	public void setNivel() {
		Professor ze = new Professor();
		ze.setNivel(Categoria.profCatedratico);
	}

	@Test
	public void setExtensao() {
		Professor ze = new Professor();
		ze.setExtensao(202);
	}

	@Test
	public void setGabinete() {
		Professor ze = new Professor();
		ze.setGabinete("C909");
	}

	@Test
	public void setSeccao() {
		Professor ze = new Professor();
		ze.setSeccao(new Seccao("40", new Departamento("Ladroes")));
	}

	@Test
	public void lancaResultado() {
		Professor ze = new Professor();
		Disciplina quimica = new Disciplina();
		Aluno miguel = new Aluno();
		ze.lancaResultado(quimica, miguel, 18);
	}

	@Test
	public void toStringTest() {
		Professor ze = new Professor();
		ze.setSeccao(new Seccao("Ali", new Departamento("Baba")));
		assertEquals(
				"Professor [grau=null, nivel=null, extensao=0, gabinete=null, seccao=Ali]",
				ze.toString());
	}

	@Test
	public void resetTest() {
		Professor.reset();
		assertEquals(Professor.objectos().size(), 0);
	}

}
